﻿using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.Authorization.Users
{
    public class UserAddress : FullAuditedEntity<long>
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public long UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual User User { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        [Required, MaxLength(20)]
        public string Receiver { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        [Required, MaxLength(20)]
        public string ReceiverPhone { get; set; }
        /// <summary>
        /// 收货人地址
        /// </summary>
        [MaxLength(100)]
        public string ReceiverAddress { get; set; }
        /// <summary>
        /// 收货人详细地址
        /// </summary>
        public string ReceiverFullAddress { get; set; }
        /// <summary>
        /// 邮政编码
        /// </summary>
        [MaxLength(10)]
        public string PostalCode { get; set; }
        /// <summary>
        /// 是否默认
        /// </summary>
        public bool IsDefault { get; set; }

        /// <summary>
        /// 是否是朋友地址
        /// </summary>
        public bool IsFriendAddress { get; set; }
    }
}
